package com.fowo.api.model.supplier.task;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商产品开发任务 导入导出辅助模型 */
@Getter
@Setter
public class SupplierTaskExcelPo {

  @NotNull(message = "任务编号不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*任务编号")
  private String taskId;

  @NotNull(message = "产品不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*产品")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "*产品")
  private List<Long> productId;

  @NotBlank(message = "标题不能为空")
  @Size(max = 1024, message = "标题长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*标题")
  private String title;

  @NotNull(message = "开始时间不能为空")
  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "*开始时间")
  private java.util.Date startTime;

  @NotNull(message = "截止时间不能为空")
  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "*截止时间")
  private java.util.Date endTime;

  @NotNull(message = "分配人员不能为空")
  @Size(max = 50, message = "分配人员长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*分配人员")
  private String toUserName;

  @ExcelIgnore
  @ExcelProperty(value = "*分配人员")
  private List<Long> toUser;

  @NotBlank(message = "状态不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*状态")
  private String status;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
